package com.chunlei.consumer.config;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

import java.util.Map;

/**
 * @author 朝花不迟暮
 * @version 1.0
 * @date 2020/11/12 8:36
 */
@Component
@RabbitListener(queues = "TestDirectQueue")
public class DirectReceiver
{
    private final Logger log = LoggerFactory.getLogger(this.getClass());

    @RabbitHandler
    public void process(Map testMessage)
    {
        log.info("【消息队列监听者】 DirectReceiver消费者收到消息：{}", testMessage.toString());
    }
}
